import sys
from .common import Common
from .board import Board
from .robot import Robot

class Init:

    def __init__(self):
        self.port = self.check_port()
        self.common = Common(self)
        self.board = Board(self)
        self.robot = Robot(self)

    def check_port(self):
        port = "/dev/ttyACM0"
        if len(sys.argv) == 2:
            port = sys.argv[1]
            self.port = port
        return port
